<template>
    <div>
          <h2>学生姓名：{{studentName}}</h2>
          <h2>年龄：{{age}}</h2>
          <button @click="showTips">点我提示</button>
          <hr/>
        </div>
</template>

<script>
export default {
      name:'MyStudent',
      data(){
        return {
          studentName:'王振乾',
          age:19
        }
      },methods: {
        showTips(){
            alert(this.studentName)
        }
      },
}
</script>

<style scoped>

</style>